import { IMDSkillConfigVal } from "../../config/SkillConfig";
import UnitX from "../../entity/UnitX";
import NoDefChargedUpEvent from "../../event/eventdef/NoDefChargedUpEvent";
import ArrowManager from "../../module/arrowabout/ArrowManager";
import DmgExecutor from "../../module/dmgabout/DmgExecutor";
import DmgFormula from "../../module/dmgabout/DmgFormula";
import L_Run from "../../utils/L_Run";
import L_String from "../../utils/L_String";
import Abs_IMDDmgSkillBase from "../Abs_IMDDmgSkillBase";

/**  */
export default class ZhenDangAOfBoss extends Abs_IMDDmgSkillBase{



  public execDmgSkill(aux: UnitX,skillIdStr:string, skConfig:IMDSkillConfigVal): void {

    let bs1=new NoDefChargedUpEvent('SECONDS',1,4,
        {   
            targetux:aux,
            runCallback:(curExecTimes)=>{
            console.log("-------蓄力阶段 防御架势降低100！------------",curExecTimes)
                 if(curExecTimes==3){
                    console.log('蓄力技发动成功!')
                    //选取范围单位执行动作/伤害
                    DmgExecutor.B_execLvlSkillCircularAreaAction(aux,L_Run.GetUnitX_L(aux.unit),L_Run.GetUnitY_L(aux.unit),skConfig,true,
                        aux.getUnitSkillLvl(skillIdStr),new Set(),
                        (u:UnitX)=>{console.log(skConfig.name,'选中了',u.name)},
                        (u:UnitX)=>{console.log(skConfig.name,'命中判定开始',u.name)},
                        skConfig.totalDmgMulLim
                        )    
                }
            },endCallback:()=>{
                console.log(skConfig.name,'技能释放结束',aux.name)
            },
            incExtraAttr:{attrs:{def_posture:-100}}
         })
    bs1.beAddedAndExec() 

  }
}